import type { EventHandler } from "h3";
export const defineAuthResponseEventHandler = (handler: EventHandler) => {
  return defineEventHandler(async (event) => {
    // const isLogin = await useStorage("redis").hasItem("currentUser");
    // if (!isLogin) {
    //   throw createError({
    //     statusCode: 401,
    //     statusMessage: "未登录",
    //   });
    // }
    // 可添加请求接口前的逻辑
    const response = await handler(event);
    // 可添加请求接口后的逻辑
    return response;
  });
};
